<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./js/jquery.js"></script>
  </head>
  <body>
    <p>文本框</p>
    <input type="text" value="我是type=test" /> <br />
    <input type="text" value="text1" /> <br />
    <input type="text" value="text2" disabled />
    <p>redis</p>
    <input type="password" value="我是type=password" /> <br />
    <p>单选框</p>
    <input type="radio" value="man" />男 <br />
    <input type="radio" value="woman" />女 <br />



    <p>复选框</p>
    <input type="checkbox" value="youxi" />游戏 <br />
    <input type="checkbox" value="zuqiu" />足球 <br />
        <input type="checkbox" checked="checked" name="check" value="shiyan" /> 实验
    <input type="checkbox" name="check" value="wuyan" />五眼
    <p>下拉框</p>
    <select>
      <option value="hubei" >湖北</option>
      <option value="wuhan" selected>武汉</option>
    </select>
    <script>
      $(function () {
        //  console.log($(":text").val());
        //  console.log($(":password").val());
        //  let obj=$(":radio")
        //   console.log(obj);
        //   for(let i=0;i<obj.length;i++){
        //     console.log($(obj[i]).val())

        //   }

        // let obj = $(":checkbox");
        // for (let i = 0; i < obj.length; i++) {
        //   console.log($(obj[i]).val());
        // }
        // console.log($(":checkbox:checked").val());
        console.log($("select > option:selected").val());
      });
    </script>
  </body>
</html>
